<?php
session_start();
if(!isset($_SESSION['id'])){
    header('Location: login.php');
    exit;
}
?>
<!DOCTYPE html>
<html lang="en" class="no-js">
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
        <meta name="viewport" content="width=device-width, initial-scale=1.0"> 
        <title>::: SOS UNITAU -- Sistema de ordem de serviço</title>

        <link rel="shortcut icon" href="img/logo.jpg">
        <link rel="stylesheet" type="text/css" href="css/normalize.css" />
        <link rel="stylesheet" type="text/css" href="css/demo.css" />
        <link rel="stylesheet" type="text/css" href="css/icons.css" />
        <link rel="stylesheet" type="text/css" href="css/style2.css" />
        <link rel="stylesheet" type="text/css" href="css/StylePage.css" />
        <link rel="stylesheet" type="text/css" href="css/default.css" />
        <link rel="stylesheet" type="text/css" href="css/component.css" />
        <script src="js/modernizr.custom.js"></script>
        <script src="js/jquery.min.js"></script>
        <script type="text/javascript" src="js/jquery1.6.min.js"></script>
        <script src="js/jquery.maskedinput-1.3.min.js"></script>
        <script type="text/javascript"><!-- PARA NAO CONFLITAR -->
            var $JQuery = jQuery.noConflict();
        </script>

        <script>
            jQuery(function ($) {
                $("#txtData").mask("99/99/9999");
                $(".tel").mask("(99) 9 9999-9999");


            });

        </script>


        <script>< !-- SCRIPT PARA ADD CAMPOS TELEFONE / EMAIL -- >
                    $(function () {

                        function removeCampo() {
                            $(".removerCampo").unbind("click");
                            $(".removerCampo").bind("click", function () {
                                if ($("tr.linhas1").length > 1) {
                                    $(this).parent().parent().remove();
                                }
                            });
                        }
                        jQuery(function ($) {
                            $jQuery("#txtData").mask("99/99/9999");
                            $jQuery(".tel").mask("(99) 9 9999-9999");

                        });

                        $JQuery(".adicionarCampo").click(function () {

                            novoCampo = $JQuery("tr.linhas1:first").clone();
                            novoCampo.find(".tel").val("");

                            novoCampo.insertAfter("tr.linhas1:last");
                            $JQuery(".tel").mask("(99) 9 9999-9999");
                            removeCampo();
                        });
                    });
            $(function () {
            function removeCampo() {
            $(".removerCampo2").unbind("click");
                    $(".removerCampo2").bind("click", function () {
            if ($("tr.linhas2").length > 1){
            $(this).parent().parent().remove();
            }
            });
            }

            $(".adicionarCampo2").click(function () {
            novoCampo = $("tr.linhas2:first").clone();
                    novoCampo.find(".email").val("")
                    novoCampo.insertAfter("tr.linhas2:last");     removeCampo();
  });
});

			
		
        </script><!-- /SCRIPT PARA ADD CAMPOS TELEFONE/EMAIL -->

    </head>
    <!--------------------------------------------------------------------------------------------------->

    <body> <!-- Inicio -->
        <div class="loading"></div>
        <div class="container"> <!-- container -->



            <!-----------------------------CONTEUDO DA PÁGINA ALTERAR FUNCIONARIO --------------------------------->
            <!------- SEGUE ABAIXO ------->



            <div class="barra-superior"></div>
            <div class="sobre-empresa">
                Powered by: Grupo NOP
            </div>

            <!------------- CONTEUDO DE FORMULARIOS---------------------->

            <div class="titulo-page">
                ::: Alterar Perfil de cadastro
            </div>

            <form name="altFuncionario" id="altFuncionario" method="post" enctype="multipart/form-data" action="" class="style-form">

                <fieldset>
                    <legend>Informações do Funcionário: </legend>
                    <table width="800px" class="table-form">
                        <tr>
                            <td> <label for="txtNome"> Nome: </label> </td>
                            <td> <input name="txtNome" id="txtNome" type="text" required  placeholder="Ex: Maria Madalena" /></td>
                        </tr>
                        <td> <label for="txtApelido"> Apelido: </label></td>
                        <td> <input name="txtApelido" id="txtApelido" type="text" required placeholder="Ex: Jorginho" /></td>
                        </tr>
                        <tr>
                            <td> <label for="txtDataNasc"> Data de nascimento: </label> </td>
                            <td> <input name="txtDataNasc" id="txtDataNasc" type="Date" required placeholder="Ex: 10/10/1986" /></td>
                        </tr>
                    </table>
                    <input name="foto" id="foto" type="file" class="file" title="Adicionar foto" /> 
                    <div class="photo-space"><div id="info-photo">Foto: 128x128</div></div>
                </fieldset>

                <div class="clear"></div>

                <fieldset>
                    <legend>Informações de Logradouro:</legend>
                    <table width="800px" class="table-form">
                        <tr>
                            <td> <label for="txtCEP"> CEP: </label> </td>
                            <td> <input name="txtCEP" id="txtCEP" type="text" class="cep" required placeholder="Ex: 12080-440"  /></td>
                            <td> <a href="javascript:abrir('adicionarCEP.php');"> <input type="button"  value="Adicionar CEP" class="botao"/></a></td>
                        </tr>
                        <td> <label for="txtEndereco"> Endereço: </label></td>
                        <td> <textarea name="txtEndereco" id="txtEndereco" disabled></textarea></td>
                        </tr>
                        <tr>
                            <td> <label for="txtBairro"> Bairro: </label> </td>
                            <td> <input name="txtBairro" id="txtBairro" type="text" disabled  /></td>
                        </tr>
                        <tr>
                            <td> <label for="txtCidade"> Cidade: </label> </td>
                            <td> <input name="txtCidade" id="txtCidade" type="text" disabled/></td>
                        </tr>
                        <tr>
                            <td> <label for="txtUF"> UF: </label> </td>
                            <td> <input name="txtUF" id="txtUF" type="text" style="width:50px" maxlength="2" disabled /></td>
                            <td> <label for="txtNum"> Número: </label> </td>
                            <td> <input name="txtNum" id="txtNum" type="number" style="width:70px" maxlength="7"/></td>
                        </tr>

                    </table>
                </fieldset>
                <div class="clear"></div>

                <fieldset>
                    <legend>Informações de Contato:</legend>
                    <table width="800px" class="table-form">
                        <tr>
                            <td> <label for="txtTel" class="tel"> Telefones: </label> </td>
                            <td> <input name="txtTel[]" id="txtTel[]" type="text" required style="width: 150px" class="tel" placeholder="Informe o telefone" /></td>
                            <td> <label for="txtTipo" class="tel"> Tipo: </label> </td>
                            <td> <select name="txtTipo[]" id="txtTipo[]" style="width:90px" >
                                    <option value="residencial"> Res. </option>
                                    <option value="pessoal"> Pes. </option>
                                    <option value="fax"> Fax. </option>
                                    <option value="radio"> Rad. </option>
                                </select>
                            </td>

                        </tr>
                        <tr class="linhas1">
                            <td>&nbsp; </td>
                            <td> <input name="txtTel[]" id="txtTel[]" type="text" style="width: 150px" class="tel" placeholder="Informe o telefone" /></td>
                            <td> <label for="txtTipo" class="tel"> Tipo: </label> </td>
                            <td> <select name="txtTipo[]" id="txtTipo[]" style="width:90px">
                                    <option value="residencial"> Res. </option>
                                    <option value="pessoal"> Pes. </option>
                                    <option value="fax"> Fax. </option>
                                    <option value="radio"> Rad. </option>
                                </select>
                            </td>
                            <td><input type="button" class="removerCampo botao" value="Remover telefone" /></td>
                        </tr>
                        <input type="button" class="adicionarCampo botao" value="Adicionar mais telefones" />
                    </table>

                    <table width="800px" class="table-form">
                        <tr>
                            <td> <label for="txtEmail[]"> E-mail: </label></td>
                            <td> <input name="txtEmail[]" id="txtEmail[]" type="text" required style="width: 180px" placeholder="Informe o E-mail" /></td>
                            <td> <label for="txtTipoEmail[]"> Tipo: </label> </td>
                            <td> <select name="txtTipoEmail[]" id="txtTipoEmail[]" style="width:90px">
                                    <option value="comercial"> Com. </option>
                                    <option value="pessoal"> Pes. </option>
                                    <option value="outro"> Outro. </option>
                                </select>
                                </select>
                            </td>
                        </tr>

                        <tr class="linhas2">
                            <td>&nbsp; </td>
                            <td> <input name="txtEmail[]" id="txtEmail[]" type="text" style="width: 180px" class="email" placeholder="Informe o E-mail 2" /></td>
                            <td> <label for="txtTipoEmail[]"> Tipo: </label> </td>
                            <td> <select name="txtTipoEmail[]" id="txtTipoEmail[]" style="width:90px">
                                    <option value="comercial"> Com. </option>
                                    <option value="pessoal"> Pes. </option>
                                    <option value="outro"> Outro. </option>
                                </select>

                            </td>
                            <td><input type="button" class="removerCampo2 botao" value="Remover e-mail" /></td>

                        </tr>
                        <input type="button" class="adicionarCampo2 botao" value="Adicionar mais e-mail" />

                    </table>
                </fieldset>

                <div class="clear"></div>

                <fieldset>
                    <legend>Informações de Login se senha: </legend>
                    <table width="800px" class="table-form">
                        <tr>
                            <td> <label for="txtLogin"> Login: </label> </td>
                            <td> <input name="txtLogin" id="txtLogin" type="text" required style="width:250px" placeholder="Ex: Chico123" /></td>
                        </tr>
                        <tr>
                            <td> <label for="txtSenha"> Senha Atual: </label></td>
                            <td> <input name="txtSenha" id="txtSenha" type="password" required style="width:250px" /></td>
                        </tr>
                        <tr>
                            <td> <label for="txtSenhaNova"> Nova Senha: </label></td>
                            <td> <input name="txtSenhaNova" id="txtSenhaNova" type="password" required style="width:250px" /></td>
                        </tr>
                        <tr>
                            <td> <label for="txtNivel"> Nível de Acesso </label> </td>
                            <td> <select name="txtNivel" id="txtNivel" style="width:150px">
                                    <option value=""></option>
                                    <option value=""></option>
                                    <option value=""></option>
                                </select>
                            </td>
                            <td> <a href="javascript:abrir('adicionarNiveis.php');"> <input type="button" value="Adicionar mais Níveis" class="botao"/></a></td>

                        </tr>
                    </table>
                </fieldset>

                <div class="clear"></div>   
                <fieldset>
                    <legend> Escolha a função: </legend>
                    <table width="800px" class="table-form">
                        <tr>
                            <td> <input name="chkFuncao[]" id="chkFuncao[]" type="checkbox" />&nbsp; &nbsp;Eletricista</td>
                            <td> <input name="chkFuncao[]" id="chkFuncao[]" type="checkbox" />&nbsp; &nbsp;Eletricista</td>
                            <td> <input name="chkFuncao[]" id="chkFuncao[]" type="checkbox" />&nbsp; &nbsp;Eletricista</td>
                            <td> <input name="chkFuncao[]" id="chkFuncao[]" type="checkbox" />&nbsp; &nbsp;Eletricista</td>
                            <td> <input name="chkFuncao[]" id="chkFuncao[]" type="checkbox" />&nbsp; &nbsp;Eletricista</td>
                            <td> <input name="chkFuncao[]" id="chkFuncao[]" type="checkbox" />&nbsp; &nbsp;Eletricista</td>
                        </tr>
                        <tr>
                            <td> <input name="chkFuncao[]" id="chkFuncao[]" type="checkbox" />&nbsp; &nbsp;Eletricista</td>
                            <td> <input name="chkFuncao[]" id="chkFuncao[]" type="checkbox" />&nbsp; &nbsp;Eletricista</td>
                            <td> <input name="chkFuncao[]" id="chkFuncao[]" type="checkbox" />&nbsp; &nbsp;Eletricista</td>
                            <td> <input name="chkFuncao[]" id="chkFuncao[]" type="checkbox" />&nbsp; &nbsp;Eletricista</td>
                            <td> <input name="chkFuncao[]" id="chkFuncao[]" type="checkbox" />&nbsp; &nbsp;Eletricista</td>
                            <td> <input name="chkFuncao[]" id="chkFuncao[]" type="checkbox" />&nbsp; &nbsp;Eletricista</td>
                        </tr> 
                        <tr>
                            <td> <input name="chkFuncao[]" id="chkFuncao[]" type="checkbox" />&nbsp; &nbsp;Eletricista</td>
                            <td> <input name="chkFuncao[]" id="chkFuncao[]" type="checkbox" />&nbsp; &nbsp;Eletricista</td>
                            <td> <input name="chkFuncao[]" id="chkFuncao[]" type="checkbox" />&nbsp; &nbsp;Eletricista</td>
                            <td> <input name="chkFuncao[]" id="chkFuncao[]" type="checkbox" />&nbsp; &nbsp;Eletricista</td>
                            <td> <input name="chkFuncao[]" id="chkFuncao[]" type="checkbox" />&nbsp; &nbsp;Eletricista</td>
                            <td> <input name="chkFuncao[]" id="chkFuncao[]" type="checkbox" />&nbsp; &nbsp;Eletricista</td>
                        </tr> 

                    </table>
                    <td> <a href="javascript:abrir('adicionarFuncao.php');"> <input type="button" value="Adicionar mais Funções" class="botao"/></a></td>
                </fieldset>

                <div class="clear"></div>   

                <fieldset>
                    <legend>Informações do local de trabalho: </legend>
                    <table width="800px" class="table-form">
                        <tr>
                            <td> <label for="txtCampus"> Campus: </label> </td>
                            <td> <select name="txtCampus" id="txtCampus" style="width:150px">
                                    <option value=""></option>
                                    <option value=""></option>
                                    <option value=""></option>
                                </select></td>
                            <td>  <a href="javascript:abrir('adicionarCampus.php');"> <input type="button"  value="Adicionar mais Campus" class="botao"/></a></td>
                        </tr>
                        <td> <label for="txtPredio"> Prédio: </label> </td>
                        <td> <select name="txtPredio" id="txtPredio" style="width:150px">
                                <option value=""></option>
                                <option value=""></option>
                                <option value=""></option>
                            </select></td>
                        <td> <a href="javascript:abrir('adicionarPredio.php');"> <input type="button"  value="Adicionar mais prédio" class="botao"/></a></td>
                        </tr>
                        <tr>
                            <td> <label for="txtSala"> Sala: </label> </td>
                            <td> <select name="txtSala" id="txtSala" style="width:150px">
                                    <option value=""></option>
                                    <option value=""></option>
                                    <option value=""></option>
                                </select></td>

                            <td> <a href="javascript:abrir('adicionarSala.php');"> <input type="button" value="Adicionar mais sala" class="botao"/></a></td>
                        </tr>
                    </table>
                </fieldset>

                <input type="submit" value="Alterar" style="display:inline-block; margin-left:75%; margin-top:3%;" class="botao" /><input type="reset" value="Cancelar" style="margin-left:5%;" class="botao" onclick=""/>    



            </form>        

            <!------------- /CONTEUDO DE FORMULARIOS --------------------->

            <!-------------------------INCLUSÃO DE ITENS PARA  -------------------------------->







            <!-------------------------/INCLUSÃO DE ITENS PARA  -------------------------------->


            <!-- MENU NA FRENTE DO CONTEUDO, CONTEUDO FICARÁ INATIVO -->

            <!--------------------------------------MENU LATERAL---------------------------------------->
            <?php include_once("menuLateral.php"); ?>

            <!-- /MENU NA FRENTE DO CONTEUDO, CONTEUDO FICARÁ INATIVO -->





            <!-----------------------------------/FIM--------------------------------------------------------->
            <div class="border"> </div> <!-- Border rodapé -->

            <div class="barra-inferior"></div>



            <!------------------------------/CONTEUDO DA PÁGINA ALTERAR FUNCIONARIO ----------------------------------->



        </div><!-- /container -->
    </body><!-- Fim -->
    <!--------------------------------------------------------------------------------------------------->

    <script src="js/classie.js"></script>
    <script src="js/borderMenu.js"></script>

    <!-- SCRIPTS POP-UP -->
    <script>
                    function abrir(URL) {

                    var width = 850;
                            var height = 450;
                            var left = 240;
                            var top = 100;
                            window.open(URL, 'janela', 'width=' + width + ', height=' + height + ', top=' + top + ', left=' + left + ', scrollbars=no, status=no, toolbar=no, location=no, 			directories=no, menubar=no, resizable=0,maximized=no, fullscreen=no');
                            }



    </script>

    <!-- /SCRIPTS POP-UP -->
</html>